package com.emm.yixun.jobs;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.emm.yixun.common.app.base.CommonResDTO;
import com.emm.yixun.common.response.Response;
import com.emm.yixun.system.service.NoticeServiceFacade;

/***
 * 逾期未签约 描述: 通知对象：①经纪人；②销管负责人；3 案场负责人；4 营销负责人 通知内容：你的客户xx（客户名称）已经预期未签约，请尽快处理或申请延期签约。
 */
@Component
public class CustomerNoSignedJob {
	private static Logger logger = LoggerFactory.getLogger(CustomerNoSignedJob.class);

	@Autowired
	private NoticeServiceFacade noticeServiceFacade;

	@Scheduled(cron = "${quartz.cron.customerNoSignedJob}")
	public void customerCareNotice() {
		logger.info("逾期未签约消息创建 job start..........");
		Response<CommonResDTO> response = noticeServiceFacade.customerNoSignedNotice();
		if (response.isSuccess()) {
			logger.info("..........逾期未签约消息创建成功..........");
		} else {
			logger.info("..........逾期未签约消息创建失败..........");
		}
		logger.info("逾期未签约消息创建 job end..........");
	}

}
